<?php
header('Content-Type: text/html; charset=utf-8');
ini_set('date.timezone','Asia/Shanghai');
define('WEB_ROOT',dirname(__DIR__));//定义网站根目录
require_once WEB_ROOT.'/include/function/public.php';

require_once WEB_ROOT.'/config/config.php';

$mysql=mysqli_connect(
    $web_config['db']['host'],
    $web_config['db']['user'],
    $web_config['db']['pwd'],
    $web_config['db']['dbname'],
    $web_config['db']['port']
);
$error=mysqli_connect_error();
echo $error;
if (!$mysql)
{
    echo 'mysql连接失败';
    exit;
}
mysqli_query($mysql,'SET NAMES UTF8');
/*$mysql=mysqli_connect('127.0.0.1',
    'root',
    '7b3eee1c29',
    'test',3306);*/


